The Eating Club
Whole groups of people want to keep track of what they eat and to compare progress. This case study describes extensions to the You Are What You Eat and You Forgot What You Ate programs to handle a complex food list, multiple users, and several reporting formats. The program should be able to sort foods and entries and do it quickly.
Problem Statement
Terry calls us a couple of weeks after we give him the You Forgot What You Ate programs. Here is the conversation:
TERRY: A group of my friends and I have been comparing our progress in controlling our diets. I showed the program to them and they want to use it too. Is that OK?
MIKE AND MARCIA: Probably. What were the reactions of your friends?
TERRY: Well, they were excited. For example, my friend Erin has been looking for a program like this. She has lots of computer experience. She did say that the program is a bit slow. Is that what you mean?
MIKE AND MARCIA: We aren't surprised. Our goal was to put the program together quickly. We could make it more efficient.
TERRY: Well, that would make Erin happy.
MIKE AND MARCIA: Were there other comments?
TERRY: Well, several of us have been competing to see who can bring down their calories and fat intake the most. We'd like to compare our graphs. It would be easier if the graphs were all on the same scale. Is that possible?
MIKE AND MARCIA: That would be straightforward. We'd need to know what scales make sense. Are there different scales for men and women, for example?
TERRY: Maybe the program could just ask us for the maximum and minimum values for the graphs? See, I'm getting the idea of this user interface stuff!
MIKE AND MARCIA: Sounds good. Any other comments?
TERRY: One of my friends is from India. She eats some foods that aren't on the food list. Is there a way to add foods to the list?
MIKE AND MARCIA: That would be possible. What did you have in mind? Would each person have an individual food list or do you want to add the foods that everyone eats to a general list?
TERRY: We'd like to have a general list. Sometimes my friend invites all of us over for dinner so we all need these foods on our lists.
MIKE AND MARCIA: We will work on that. We'll get back to you in a few days.
TERRY: Thanks.
Analysis
12.1 What else should we have asked Terry?
Analysis
12.2 In what other ways might the program be customized or improved? Explain.
Reflection
12.3 How would you look for parts of a program that you could rewrite to be more efficient?
Reflection
12.4 We were somewhat reluctant to distribute our program to a large number of people before we worked on improving its efficiency. Suppose you had quickly put together a program for a friend. What aspects of the program would you have to fix before you would distribute it to a wider audience? Explain